﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Adex;
using System.Data;

namespace MediaMonitor.Client
{
    public partial class Company_Users : Adex.BasePage
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void radGrid_NeedDataSource(object source, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
        {
            if (Session["CompanyCode"] != null)
            {
                DataTable dt = SiteUser.Query().SetSelectList("*, CONVERT(VARCHAR, DateAdded, 101) AS SignupDate, CONVERT(VARCHAR, ValidTo, 101) AS ValidToDate, CONVERT(VARCHAR, ValidFrom, 101) AS ValidFromDate").WHERE("CompanyCode", Session["CompanyCode"].ToString()).ORDER_BY("Username").ExecuteDataSet().Tables[0];
                radGrid.DataSource = dt;
            }


        }
    }
}